package com.sxhuayuan.parking.service;

import java.util.List;

import com.sxhuayuan.parking.entity.Member;
import com.sxhuayuan.parking.entity.MemberCarPlate;

public interface MemberCarPlateService extends BaseService<MemberCarPlate, Long> {

	/**
	 * 查询用户全部车牌
	 * 
	 * @param memberId
	 * @return
	 */
	List<MemberCarPlate> findList(Long memberId);

	/**
	 * 获取用户绑定车牌数
	 * 
	 * @param memberId
	 * @return
	 */
	Long findCount(Long memberId);

	/**
	 * 根据车主和车牌号查询
	 */
	MemberCarPlate findByMemberIdAndCarPlate(Long memberId, String carPlate);

	/**
	 * 设置默认车牌
	 * 
	 * @param carPlateId
	 */
	void setDefault(Member member, Long carPlateId);
	
	/**
	 * 如果没有绑定则绑定车牌
	 * @param member
	 * @param carPlate
	 */
	void saveIfNotBind(Member member, String carPlate, Boolean isDef);
}
